<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>插值表达式</title>
</head>
<body>
    <div id="app">
        <p>{{ nickname }}</p>
        <p>{{ nickname.toUpperCase() }}</p>
        <p>{{ age > 18 ? '已成年' : '未成年' }}</p>
        <p>{{ friend.name }}</p>
        <p>{{ friend.desc }}</p>
        <p>插值表达式不能用于标签属性内</p>
    </div>
    <script src="../utils/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                nickname: "Ning Che",
                age: 21,
                friend: {
                    name: '小胡胡',
                    desc: '最可爱的女朋友'
                }
            }
        })
    </script>
</body>
</html>